"""Django_MySQL_Table URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.urls import path,include
from django.conf.urls import url
from . import views
urlpatterns = [
    path('', views.mylogin),
    # 用于测试的url
    path('test/',views.test),
    path('test/get_test_data/',views.get_test_data),
    path('test/error',views.error),
    # 用于测试的url

    # 登录模块
    path('login/',views.gotologin),
    path('gotoadduser/', views.gotoadduser),
    path('adduser/', views.addUser),
    path('logoutapi/',views.logoutapi),
    path('gotoaddsuperuser/',views.gotoaddsuperuser),
    path('get_user_data/',views.get_user_data),
    # 登录模块

    # 药品模块
    path('medicine/',views.MedicineAPI,name='medicine'),
    path('medicine/add',views.Medicine_Add,name='medicine_add'),
    path('medicine/update',views.Medicine_Update,name='medicine_update'),
    path('medicine/delete',views.Medicine_Delete,name='medicine_delete'),
    path('medicine/get_medicine_data/', views.get_medicine_data, name='get_medicine_data'),
    # 药品模块

    path('worker/',views.WorkerAPI,name='worker'),
    path('worker/add',views.Worker_Add,name='worker_add'),
    path('worker/update',views.Worker_Update,name='worker_update'),
    path('worker/delete',views.Worker_Delete,name='worker_delete'),
    path('worker/get_worker_data/', views.get_worker_data, name='get_worker_data'),

    path('customer/', views.CustomerAPI, name='customer'),
    path('customer/add', views.Customer_Add, name='customer_add'),
    path('customer/update', views.Customer_Update, name='customer_update'),
    path('customer/delete', views.Customer_Delete, name='customer_delete'),
    path('customer/get_customer_data/', views.get_customer_data, name='get_customer_data'),

    path('producer/', views.ProducerAPI, name='producerInfo'),
    path('producer/add', views.Producer_Add, name='producer_add'),
    path('producer/update', views.Producer_Update, name='producer_update'),
    path('producer/select', views.Producer_Select, name='producer_select'),
    path('producer/delete', views.Producerr_Delete, name='producer_delete'),
    path('producer/get_producer_data/', views.get_producer_data, name='get_producer_data'),


    path('index/', views.index),
    path('get_mas/', views.get_mas),

    path('store/', views.StoreAPI),
    path('store/get_store_data/', views.get_store_data),

    path('medicine_producer/', views.Medicine_producerAPI, name='medicine_producerInfo'),
    path('medicine_producer/add/', views.Medicine_producer_Add, name='medicine_producer_add'),
    path('medicine_producer/delete/', views.Medicine_producer_Delete, name='medicine_producer_delete'),
    path('medicine_producer/update/', views.Medicine_producer_Update, name='medicine_producer_update'),
    path('medicine_producer/get_medicine_producer_data/', views.get_medicine_producer_data,
         name='get_medicine_producer_data'),

    path('purchase/', views.PurchaseAPI, name='purchaseInfo'),
    path('purchase/add/', views.Purchase_Add, name='Purchase_add'),
    path('purchase/delete/', views.Purchase_Delete, name='Purchase_delete'),
    path('purchase/update/', views.Purchase_Update, name='Purchase_update'),
    path('purchase/get_purchase_data/', views.get_purchase_data, name='get_purchase_data'),

    path('sell/', views.SellAPI, name='sellInfo'),
    path('sell/add/', views.Sell_Add, name='sell_add')      ,
    path('sell/delete/', views.Sell_Delete, name='sell_delete'),
    path('sell/update/', views.Sell_Update, name='sell_update'),
    path('sell/get_sell_data/', views.get_sell_data, name='get_selle_data'),

]
